package com.yuebao.request;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;

public class RequestParameter <T>{
    
    @NotNull
    @Valid
    private T body;
    
    public void setBody(T body) {
        this.body = body;
    }
    
    public T getBody() {
        return this.body;
    }
    
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof RequestParameter)) {
            return false;
        } else {
            RequestParameter<?> other = (RequestParameter)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                Object this$body = this.getBody();
                Object other$body = other.getBody();
                if (this$body == null) {
                    if (other$body != null) {
                        return false;
                    }
                } else if (!this$body.equals(other$body)) {
                    return false;
                }
                
                return true;
            }
        }
    }
    
    protected boolean canEqual(final Object other) {
        return other instanceof RequestParameter;
    }
    
    
    
    public String toString() {
        return "RequestParameter(body=" + this.getBody() + ")";
    }
    
    public RequestParameter() {
    }
    
    public RequestParameter(final T body) {
        this.body = body;
    }
}
